<?php

class categoryComponents extends sfComponents
{
  public function executeCategoriesList()
  {
    $rootCategory = Doctrine_Query::create()
            ->select('c.*')
            ->from('Category c')
            ->where('c.parentCategory IS NULL')
            ->fetchOne();
    $this->tree = $rootCategory;
  }
}